package com.iot08.api.config.sms;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @Description 万能验证码配置
 * @Author qinrongjun
 * @Date 2022/1/4 14:42
 */
@RefreshScope
@Component
@ConfigurationProperties(prefix = "switch-validate")
public class SwitchValidateConfig {
    /**
     * 启用万能验证码
     */
    private boolean enable;
    /**
     * 万能验证码的手机号码
     */
    private String mobile;
    /**
     * 万能验证码
     */
    private String code;

    /**
     * 是否启用万能验证码
     * @return
     */
    public boolean isEnable() {
        return enable;
    }

    public SwitchValidateConfig setEnable(boolean enable) {
        this.enable = enable;
        return this;
    }

    public String getMobile() {
        return mobile;
    }

    public SwitchValidateConfig setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public String getCode() {
        return code;
    }

    public SwitchValidateConfig setCode(String code) {
        this.code = code;
        return this;
    }
}
